// Copyright (c) 2015-present, salesforce.com, inc. All rights reserved
// Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license

@mixin tab-notification-before($color, $hover-color) {

  &:before {
    animation: none;
    animation-duration: 1s;
    animation-iteration-count: 3;
    animation-delay: 150ms;
    animation-timing-function: cubic-bezier(0.07, 0.49, 0.50, 1);
    background-color: $color;
    bottom: 0;
    content: '';
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: background-color 0.25s cubic-bezier(0.39, 0.575, 0.565, 1);
  }

  &:hover {

    &:before {
      background-color: $hover-color;
      height: auto;
    }
  }
}

@mixin tab-notification-pulsing-animation() {
  @keyframes error-pulse {

    0% {
      background-color: var(--slds-g-color-error-base-40, #{$color-background-destructive});
    }


    40% {
      background-color: var(--slds-g-color-error-base-30, #{$color-background-destructive-active});
    }

    100% {
      background-color: var(--slds-g-color-error-base-40, #{$color-background-destructive});
    }
  }

  @keyframes success-pulse {

    0% {
      background-color: var(--slds-g-color-success-base-50, #{$color-background-success-dark});
    }


    40% {
      background-color: var(--slds-g-color-success-base-40, #{$color-background-success-darker});
    }

    100% {
      background-color: var(--slds-g-color-success-base-50, #{$color-background-success-dark});
    }
  }

  @keyframes warning-pulse {

    0% {
      background-color: var(--slds-g-color-warning-base-60, #{$color-background-warning});
    }


    40% {
      background-color: var(--slds-g-color-warning-base-60, #{$color-background-warning-dark});
    }

    100% {
      background-color: var(--slds-g-color-warning-base-60, #{$color-background-warning});
    }
  }
}
